package com.dongdongshop.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.dongdongshop.mapper.TbCitiesMapper;
import com.dongdongshop.pojo.address.TbCities;
import com.dongdongshop.pojo.address.TbCitiesExample;
import com.dongdongshop.pojo.address.TbProvinces;
import com.dongdongshop.service.CitieServiceI;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

@Component
@Service
public class CitieServiceImpl implements CitieServiceI {

    @Resource
    private TbCitiesMapper citiesMapper;



    @Override
    public List<TbCities> getCity(String provinceid) {
        TbCitiesExample example=new TbCitiesExample();
        TbCitiesExample.Criteria criteria = example.createCriteria();
        criteria.andProvinceidEqualTo(provinceid);
        return citiesMapper.selectByExample(example);
    }
}
